//package slidevalidate;
//
//import androidx.appcompat.app.AppCompatActivity;
//
//import android.os.Bundle;
//import android.view.animation.Animation;
//import android.view.animation.AnimationUtils;
//import android.widget.Toast;
//
//import com.aliang.auto.R;
//import com.luozm.captcha.Captcha;
//
//public class SlideValidateActivity extends AppCompatActivity {
//
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_slide_validate);
//        final com.luozm.captcha.Captcha captcha = findViewById(R.id.captCha);
//        captcha.setCaptchaListener(new Captcha.CaptchaListener() {
//            @Override
//            public String onAccess(long time) {
//                Toast.makeText(SlideValidateActivity.this, "验证成功", Toast.LENGTH_SHORT).show();
//                return "验证通过";
//            }
//
//            @Override
//            public String onFailed(int count) {
////                Animation shake = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.shake);
////                captcha.startAnimation(shake);//抖动
//
//                Toast.makeText(SlideValidateActivity.this, "验证失败,失败次数" + count, Toast.LENGTH_SHORT).show();
//                return "验证失败";
//            }
//
//            @Override
//            public String onMaxFailed() {
//                Toast.makeText(SlideValidateActivity.this, "验证超过次数，你的帐号被封锁", Toast.LENGTH_SHORT).show();
//                return "可以走了";
//            }
//        });
//    }
//}